//
//  OnePicsOfCell.m
//  PetAPP
//
//  Created by dllo on 16/1/27.
//  Copyright © 2016年 Yuming. All rights reserved.
//

#import "OnePicsOfCell.h"

@implementation OnePicsOfCell

- (void)setPicViewOfHeightWithModel:(ModelOfContent *)model {
    if (model.pics.count == 0) {
        self.viewOfpics.frame = CGRectMake(0, self.beginHeight, self.frame.size.width, 0);
        return;
    }
    
    
    CGFloat picViewHeight = 400;
    CGFloat picViewWidth = self.frame.size.width;
    UIImageView *imageView = [self viewWithTag:10];
    imageView.frame = CGRectMake(0 , 0, picViewWidth, picViewHeight);
    imageView.yy_imageURL = [NSURL URLWithString:[model.pics[0] objectForKey:@"url"]];
    
    self.viewOfpics.frame = CGRectMake(0, self.beginHeight, self.frame.size.width, picViewHeight);
    
}

@end
